package org.yoki.edu.bg.radius.core.raw.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.yoki.edu.bg.radius.core.raw.infra.RadPostAuthRepository;
import com.yunzhitx.cloud.common.model.ddd.InstanceFactory;
import lombok.Data;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 代码生成器自动生成
 * Date:2018-1-3 13:39:27
 * @author
 */
@Data
@Table(name = "radius_rad_post_auth")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RadPostAuth implements Serializable{

	private static final long serialVersionUID = 1L;

    /** */
    @Column(name = "id")
    private Integer id;
    /** */
    @Column(name = "username")
	private String username;
    /** */
    @Column(name = "pass")
	private String pass;
    /** */
    @Column(name = "reply")
	private String reply;
    /** */
    @Column(name = "authdate")
	private Date authdate;
	public RadPostAuth(){}

    public RadPostAuth(Integer id){setId(id);}

    private static RadPostAuthRepository radPostAuthRepository;
    public static RadPostAuthRepository getRadPostAuthRepository(){
		if(null==radPostAuthRepository){
			radPostAuthRepository = InstanceFactory.getInstance(RadPostAuthRepository.class);
		}
    	return radPostAuthRepository;
    }

    /**
    * 根据Id，更新RadPostAuth
    *
    * @param
    * @return
    */
    public void update() {
        getRadPostAuthRepository().updateByPrimaryKeySelective(this);
    }

    /**
    * 根据主键ID查询RadPostAuth
    * @param id
    * @return
    */
    /*
    public static RadPostAuthVO selectDetailById(int id) {
        RadPostAuthVO vo = getRadPostAuthRepository().selectDetailById(id);
        return vo;
    }
    */

}